/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ordering.pojo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author hua
 */
@Entity
@Table(name = "t_ord_vip")
@NamedQueries({@NamedQuery(name = "VipCustomer.findAll", query = "SELECT v FROM VipCustomer v"), @NamedQuery(name = "VipCustomer.findByVipId", query = "SELECT v FROM VipCustomer v WHERE v.vipId = :vipId"), @NamedQuery(name = "VipCustomer.findByVipNum", query = "SELECT v FROM VipCustomer v WHERE v.vipNum = :vipNum"), @NamedQuery(name = "VipCustomer.findByCardDate", query = "SELECT v FROM VipCustomer v WHERE v.cardDate = :cardDate"), @NamedQuery(name = "VipCustomer.findByVipName", query = "SELECT v FROM VipCustomer v WHERE v.vipName = :vipName"), @NamedQuery(name = "VipCustomer.findByVipSex", query = "SELECT v FROM VipCustomer v WHERE v.vipSex = :vipSex"), @NamedQuery(name = "VipCustomer.findByVipCred", query = "SELECT v FROM VipCustomer v WHERE v.vipCred = :vipCred"), @NamedQuery(name = "VipCustomer.findByCardType", query = "SELECT v FROM VipCustomer v WHERE v.cardType = :cardType"), @NamedQuery(name = "VipCustomer.findByCardNum", query = "SELECT v FROM VipCustomer v WHERE v.cardNum = :cardNum"), @NamedQuery(name = "VipCustomer.findByCardPwd", query = "SELECT v FROM VipCustomer v WHERE v.cardPwd = :cardPwd"), @NamedQuery(name = "VipCustomer.findByCardAmount", query = "SELECT v FROM VipCustomer v WHERE v.cardAmount = :cardAmount"), @NamedQuery(name = "VipCustomer.findByCardDiscount", query = "SELECT v FROM VipCustomer v WHERE v.cardDiscount = :cardDiscount"), @NamedQuery(name = "VipCustomer.findByVipPhone", query = "SELECT v FROM VipCustomer v WHERE v.vipPhone = :vipPhone")})
public class VipCustomer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "vip_id")
    private Long vipId;
    @Column(name = "vip_num")
    private String vipNum;
    @Column(name = "card_date")
    @Temporal(TemporalType.DATE)
    private Date cardDate;
    @Column(name = "vip_name")
    private String vipName;
    @Column(name = "vip_sex")
    private Integer vipSex;
    @Column(name = "vip_cred")
    private String vipCred;
    @Column(name = "card_type")
    private Integer cardType;
    @Column(name = "card_num")
    private String cardNum;
    @Column(name = "card_pwd")
    private String cardPwd;
    @Column(name = "card_amount")
    private Float cardAmount;
    @Column(name = "card_discount")
    private Float cardDiscount;
    @Column(name = "vip_phone")
    private String vipPhone;
    @Lob
    @Column(name = "remark")
    private String remark;

    public VipCustomer() {
    }

    public VipCustomer(Long vipId) {
        this.vipId = vipId;
    }

    public Long getVipId() {
        return vipId;
    }

    public void setVipId(Long vipId) {
        this.vipId = vipId;
    }

    public String getVipNum() {
        return vipNum;
    }

    public void setVipNum(String vipNum) {
        this.vipNum = vipNum;
    }

    public Date getCardDate() {
        return cardDate;
    }

    public void setCardDate(Date cardDate) {
        this.cardDate = cardDate;
    }

    public String getVipName() {
        return vipName;
    }

    public void setVipName(String vipName) {
        this.vipName = vipName;
    }

    public Integer getVipSex() {
        return vipSex;
    }

    public void setVipSex(Integer vipSex) {
        this.vipSex = vipSex;
    }

    public String getVipCred() {
        return vipCred;
    }

    public void setVipCred(String vipCred) {
        this.vipCred = vipCred;
    }

    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getCardPwd() {
        return cardPwd;
    }

    public void setCardPwd(String cardPwd) {
        this.cardPwd = cardPwd;
    }

    public Float getCardAmount() {
        return cardAmount;
    }

    public void setCardAmount(Float cardAmount) {
        this.cardAmount = cardAmount;
    }

    public Float getCardDiscount() {
        return cardDiscount;
    }

    public void setCardDiscount(Float cardDiscount) {
        this.cardDiscount = cardDiscount;
    }

    public String getVipPhone() {
        return vipPhone;
    }

    public void setVipPhone(String vipPhone) {
        this.vipPhone = vipPhone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (vipId != null ? vipId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VipCustomer)) {
            return false;
        }
        VipCustomer other = (VipCustomer) object;
        if ((this.vipId == null && other.vipId != null) || (this.vipId != null && !this.vipId.equals(other.vipId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ordering.pojo.VipCustomer[vipId=" + vipId + "]";
    }

}
